<?php
/**
 * 产品扩展关联属性模型
 *
 * @copyright   Copyright 2011, Richie
 * @author      Richie <richbossman@163.com>
 * @package     SMS
 * @link        http://www.letphp.com
 * 
 * $Id: PattrModel.class.php 80 2011-04-18 13:34:13Z 442767452@qq.com $
 */
class PattrModel extends SMSModel {
	
	//产品的所有属性
	function getProductAllAttribute($pid=0, $is_spec=false){
		$map['product_id'] = $pid;
		$map['is_spec'] = $is_spec ? 1 : 0;
		return $this->where($map)->getField("id,attr_id");
	}
}
?>